<?php

namespace Database\Factories;

use App\Models\ESStation;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\ESUnit>
 */
class ESUnitFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'name' => $this->faker->randomDigit() . '#单元',
            'location' =>  $this->faker->randomElement(['1#', '2#', '3#', '4#']),  
            'capacity' => $this->faker->randomElement(['1000', '2000']),  
            'current_power' =>   $this->faker->randomElement(['156.2', '363.8']),  
            // 'info' => 
            // 'remarks' => '',
            'e_s_station_id' =>  $this->faker->randomElement(ESStation::all()->pluck('id')),
        ];
    }
}
